const components = new Map()

// 导入表单组件
const forms = import.meta.glob('./form/*.vue',
  {
    eager: true,
    import: "default"
  }
)
// 导入布局组件
const layouts = import.meta.glob('./layout/*.vue',
  {
    eager: true,
    import: "default"
  }
)

Object.keys(forms).forEach((key) => {
  const defaultObject = forms[key]
  components.set(defaultObject.name, defaultObject)
})

Object.keys(layouts).forEach((key) => {
  const defaultObject = layouts[key]
  components.set(defaultObject.name, defaultObject)
})

export default components